﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace MyInterfaces
{
    /// <summary>
    /// Test service för att veriviera en Unity resolve på.
    /// </summary>
    [ServiceContract(SessionMode = SessionMode.Allowed)]
    public interface IMyService : IDisposable
    {
        [OperationContract]
        string SayHello(string message);

        [OperationContract]
        bool IsThisRight(string direction);

        [OperationContract]
        CBDCommandType UpdateInfo(CBDCommandType commandType);

        [OperationContract]
        string EchoMessage(CBDCommandType coomandType);
    }

    [DataContract]
    public class CBDCommandType
    {
        private string _command;
        private string _cbdMessage;

        [DataMember]
        public string Command
        {
            get { return _command; }
            set { _command = value; }
        }

        [DataMember]
        public string CbdMessage
        {
            get { return _cbdMessage; }
            set { _cbdMessage = value; }
        }
    }
}
